// SaveText.cpp : implementation file
//

#include "stdafx.h"
#include "InfoHide.h"
#include "SaveText.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// SaveText dialog


SaveText::SaveText(CWnd* pParent /*=NULL*/)
	: CDialog(SaveText::IDD, pParent)
{
	//{{AFX_DATA_INIT(SaveText)
	m_saveinfo = _T("");
	//}}AFX_DATA_INIT
}


void SaveText::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(SaveText)
	DDX_Text(pDX, IDC_saveinfo, m_saveinfo);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(SaveText, CDialog)
	//{{AFX_MSG_MAP(SaveText)
	ON_BN_CLICKED(IDC_TextPath, OnTextPath)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// SaveText message handlers

void SaveText::OnTextPath() 
{
	// TODO: Add your control notification handler code here
	static char szFilter[] = "All Files(*.*)|*.*||";

	CFileDialog dlg(FALSE , NULL, NULL,
		OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, szFilter );
	if (IDOK == dlg.DoModal())
	{
		m_saveinfo=dlg.GetPathName();
	}
	SetDlgItemText(IDC_saveinfo,m_saveinfo);
}
